home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)G / (A)G6.ADF / arthur < prev    next >
Text File  |  1988-05-24  |  2KB  |  81 lines

  1.  
  2.  
  3. drive wheel 100   \ give it a wheel drive with 100 extra armor \
  4. cpu 32bit         \ make it think well. \
  5. reg 5             \ only need a few storage registers. \
  6. weapon laser 30 70  \ give it a laser with 30 armor and 100 shots \
  7. weapon hgun 30 70   \ and a lgun with 30 armor and 70 shots \
  8.                   \ note since the laser was defined first, it \
  9.                   \ is weapon 0, and the lgun is 1 \
  10.  
  11. equate width 0    \ everywhere "width" is seen, it is replaced \
  12.                   \ with "0" \
  13. equate angle 1
  14. equate dist  2
  15. equate run   3
  16.  
  17.  
  18. label start      \ where to come back to when starting again \
  19. # 0 speed        \ make sure it's not going anywhere \
  20.  
  21. # 50, posy, -, enter, # 50, posx, -, atan2, # 90, -, sto run
  22.                  \ direction to go when running away. \
  23. # 90
  24. sto width     \ reg 0 holds beam width \
  25. sto angle     \ reg 1 holds angle looking at \
  26.  
  27. label scan
  28. hit           \ see if it gets hit while looking \
  29. x!=0?         \ if it does, move \
  30. goto move
  31. rcl width     \ recall the beam width \
  32. rcl angle     \ recall the scan angle \
  33. radar         \ anyone out there? \
  34. x>0?          \ found something \
  35. sto dist      \ store distance \
  36. x>0?
  37. goto sam
  38. rcl width
  39. # 2 *                    
  40. sto+ angle    \ add it \
  41.  
  42. label sam     \ found something \
  43. # 2
  44. sto/ width    \ half the beam width \
  45. rcl width
  46. sto- angle    \ take new width from scan angle \
  47. # .6
  48. x<y?          \ if width is less than .6, start firing. \
  49. goto scan
  50.  
  51. # 2, rcl dist, /, atan    \ shoot to the left a bit \
  52. rcl angle, +, aim
  53.  
  54. label fire
  55. hit
  56. x!=0? 
  57. goto move
  58. rcl dist
  59. fire 0        \ fire the laser \
  60. fire 1        \ fire the gun \
  61. # .8          \ beam width is put in x \
  62. rcl angle     \ rcl pushes stack up, so beam width is now in y,\
  63.               \ and recalled number is in x \
  64. radar         \ is it still there ? \
  65. x<0?  goto start  \ find it again if arthur lost it \
  66. sto dist         \ save its distance in case it moved \
  67. goto fire        \ otherwise keep firing \
  68.  
  69. label move
  70. # 20             \ run away!!! \
  71. speed
  72. rcl run
  73. heading
  74. # 20
  75. sto+ run         \ change direction to run each time \
  76. # 50 delay       \ a delay \
  77. # 0 speed        \ and stop \
  78. goto start       \ find something to shoot \
  79.  
  80.  
  81.